

kernel void id_check(global float *output)
{
	int global_id_0 = get_global_id(0);
	int global_id_1 = get_global_id(1);
	printf("STEP_GLOBAL_ID global_id_0:[%d] global_id_1:[%d]\n",global_id_0,global_id_1);
	
	
	int global_size_0 = get_global_size(0);
	int global_size_1 = get_global_size(1);
	printf("STEP_GLOBAL_SIZE global_size_0:[%d] global_size_1:[%d]\n",global_size_0,global_size_1);
	
	int offset_0 = get_global_offset(0);
	int offset_1 = get_global_offset(1);
	printf("STEP_GLOBAL_OFFSET offset_0:[%d] offset_1:[%d]\n",offset_0,offset_1);
	
	int local_id_0 = get_local_id(0);
	int local_id_1 = get_local_id(1);
	printf("STEP_GLOBAL_LOCAL local_id_0:[%d] local_id_1:[%d]\n",local_id_0,local_id_1);
	
	int index_0 = global_id_0 - offset_0 ;
	int index_1 = global_id_1 - offset_1 ;
	
	int index = index_1 * global_size_0 + index_0 ;
	printf("STEP_GLOBAL_INDEX index_0:[%d] index_1:[%d] index:[%d]\n",index_0,index_1,index);
	
	float f = global_id_0 * 10.0f + global_id_1 * 1.0f ;
	f += local_id_0 * 0.1f + local_id_1 * 0.01f ;
	output[index] = f ;
	printf("STEP_GLOBAL_FINAL f:[%f] output:[%f]\n",f,output[index]);

}


